home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 15 / macformat_15.iso / C de cerca / Codewarrior Lite / MacOS Support / Headers / ANSI Headers / _stdarg.h next >
Text File  |  1994-10-20  |  802b  |  33 lines

  1. /* stdarg.h standard header */
  2. #ifndef _STDARG
  3. #define _STDARG
  4. #ifndef _YVALS
  5. #include <yvals.h>
  6. #endif
  7.         /* type definitions */
  8. typedef _Va_list va_list;
  9.         /* macros */
  10. #define va_arg(ap, T)    \
  11.     (*(T *)(((ap) += _Bnd(T, _AUPBND)) - _Bnd(T, _ADNBND)))
  12. #define va_end(ap)        (void)0
  13. #define va_start(ap, A)    \
  14.     (void)((ap) = (char *)&(A) + _Bnd(A, _AUPBND))
  15. #define _Bnd(X, bnd)    (sizeof (X) + (bnd) & ~(bnd))
  16.  
  17. #if 0 /* older version of macros ... */
  18. #define va_start(ap, A) _Va_start(ap, A)
  19. #define va_arg(ap, T) _Va_arg(ap, T)
  20. #define va_end(ap)  (void)0
  21. #endif
  22. #endif
  23.  
  24. /*
  25.  * Copyright (c) 1994 by P.J. Plauger.  ALL RIGHTS RESERVED. 
  26.  * Consult your license regarding permissions and restrictions.
  27.  */
  28.  
  29. /* Change log:
  30.  *94June04 PlumHall baseline
  31.  *94Sept30 Applied diffs for Fri Aug 26 03:49:00 1994
  32.  */
  33.